<?php 
namespace app\index\model;
use think\Model;

class Good extends Model
{
	//添加
	public function getAdd($arr)
	{
         return $this->insert($arr);
	}
	//修改
    public function getGoodLists($arr)
    {
          return $this->where('id',$arr['id'])->update($arr);
    }
    //搜索
    public function getSearch($page,$limit,$search)
    {
    	 $name=$search['key']['name'];
    	 return $this->where('goods_name','like',"%$name%")->paginate($page,false,['page'=>$page]);
    }
}







 ?>